<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    <meta name="Generator" content="iWeb 1.1.2" />
    <title>Coding Standards</title>
    <link rel="stylesheet" type="text/css" media="screen" href="Coding%20Standards_files/Coding%20Standards.css" /><script type="text/javascript" src="Coding%20Standards_files/Coding%20Standards.js"></script>
  </head>
  <body style="background: #333333; margin: 0pt; " onload="onPageLoad();">
    <div style="text-align: center; ">
      <div style="margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; overflow: hidden; position: relative;  background: #000000; text-align: left; width: 800px; " id="body_content">
        <div style="float: left; height: 0px; line-height: 0px; margin-left: 0px; position: relative; width: 800px; z-index: 0; " id="nav_layer">
          <div style="height: 0px; line-height: 0px; " class="tinyText"> </div>
        </div>
        <div style="float: left; height: 0px; line-height: 0px; margin-left: 0px; position: relative; width: 800px; z-index: 10; " id="header_layer">
          <div style="height: 0px; line-height: 0px; " class="tinyText"> </div>
        </div>
        <div style="margin-left: 0px; position: relative; width: 800px; z-index: 5; " id="body_layer">
          <div style="height: 0px; line-height: 0px; " class="tinyText"> </div>
          <div class="graphic_textbox_style_default" style="height: 46px; left: 0px; position: absolute; top: 71px; width: 800px; z-index: 1; " id="id2">
            <div>
              <div class="graphic_textbox_layout_style_default">
                <div class="paragraph Body" style="line-height: 20px; padding-bottom: 0pt; padding-top: 0pt; "><div style="height: 44px; left: -3px; margin-bottom: -6px; margin-right: -5px; position: relative; top: -4px; width: 797px; " id="id1"><img usemap="#map1" id="shapeimage_1" src="Coding%20Standards_files/shapeimage_1.png" style="border: none; height: 44px; left: 0px; position: absolute; top: 0px; width: 797px; z-index: 1; " alt="    Home             Download             Gallery             Developers             Documentation            Contact        Links" title="" /><map name="map1" id="map1"><area href="Home.html" title="Home.html" shape="rect" alt="Home.html" onload="IMpreload('Coding Standards_files', 'shapeimage_1', '0');" onmouseover="IMmouseover('shapeimage_1', '0');" onmouseout="IMmouseout('shapeimage_1', '0');" coords="32, 9, 74, 31" /><area href="Download.html" title="Download.html" shape="rect" alt="Download.html" onload="IMpreload('Coding Standards_files', 'shapeimage_1', '1');" onmouseover="IMmouseover('shapeimage_1', '1');" onmouseout="IMmouseout('shapeimage_1', '1');" coords="126, 9, 195, 31" /><area href="Gallery.html" title="Gallery.html" shape="rect" alt="Gallery.html" onload="IMpreload('Coding Standards_files', 'shapeimage_1', '2');" onmouseover="IMmouseover('shapeimage_1', '2');" onmouseout="IMmouseout('shapeimage_1', '2');" coords="247, 9, 297, 31" /><area href="Developers.html" title="Developers.html" shape="rect" alt="Developers.html" onload="IMpreload('Coding Standards_files', 'shapeimage_1', '3');" onmouseover="IMmouseover('shapeimage_1', '3');" onmouseout="IMmouseout('shapeimage_1', '3');" coords="349, 9, 427, 31" /><area href="Documentation.html" title="Documentation.html" shape="rect" alt="Documentation.html" onload="IMpreload('Coding Standards_files', 'shapeimage_1', '4');" onmouseover="IMmouseover('shapeimage_1', '4');" onmouseout="IMmouseout('shapeimage_1', '4');" coords="479, 9, 582, 31" /><area href="Contact.html" title="Contact.html" shape="rect" alt="Contact.html" onload="IMpreload('Coding Standards_files', 'shapeimage_1', '5');" onmouseover="IMmouseover('shapeimage_1', '5');" onmouseout="IMmouseout('shapeimage_1', '5');" coords="630, 9, 684, 31" /><area href="Links.html" title="Links.html" shape="rect" alt="Links.html" onload="IMpreload('Coding Standards_files', 'shapeimage_1', '6');" onmouseover="IMmouseover('shapeimage_1', '6');" onmouseout="IMmouseout('shapeimage_1', '6');" coords="715, 9, 752, 31" /></map><img style="height: 22px; left: 32px; position: absolute; top: 9px; width: 42px; " id="shapeimage_1_link_0" alt="shapeimage_1_link_0" src="Coding Standards_files/shapeimage_1_link_0.png" /><img style="height: 22px; left: 126px; position: absolute; top: 9px; width: 69px; " id="shapeimage_1_link_1" alt="shapeimage_1_link_1" src="Coding Standards_files/shapeimage_1_link_1.png" /><img style="height: 22px; left: 247px; position: absolute; top: 9px; width: 50px; " id="shapeimage_1_link_2" alt="shapeimage_1_link_2" src="Coding Standards_files/shapeimage_1_link_2.png" /><img style="height: 22px; left: 349px; position: absolute; top: 9px; width: 78px; " id="shapeimage_1_link_3" alt="shapeimage_1_link_3" src="Coding Standards_files/shapeimage_1_link_3.png" /><img style="height: 22px; left: 479px; position: absolute; top: 9px; width: 103px; " id="shapeimage_1_link_4" alt="shapeimage_1_link_4" src="Coding Standards_files/shapeimage_1_link_4.png" /><img style="height: 22px; left: 630px; position: absolute; top: 9px; width: 54px; " id="shapeimage_1_link_5" alt="shapeimage_1_link_5" src="Coding Standards_files/shapeimage_1_link_5.png" /><img style="height: 22px; left: 715px; position: absolute; top: 9px; width: 37px; " id="shapeimage_1_link_6" alt="shapeimage_1_link_6" src="Coding Standards_files/shapeimage_1_link_6.png" /></div><span class="tinyText"> </span></div>
              </div>
              <div style="clear: both; height: 0px; line-height: 0px; " class="tinyText"> </div>
            </div>
          </div>
          

<img src="Coding%20Standards_files/shapeimage_2.jpg" alt="" style="height: 1px; left: 85px; position: absolute; top: 0px; width: 630px; z-index: 1; " />


          <div class="graphic_generic_title_textbox_style_default" style="height: 49px; left: 35px; position: absolute; top: 22px; width: 630px; z-index: 1; " id="id3">
            <div>
              <div class="graphic_shape_layout_style_default">
                <div class="paragraph Title" style="line-height: 42px; padding-bottom: 0pt; padding-top: 0pt; ">Retribution</div>
              </div>
            </div>
          </div>
          

<img src="Coding%20Standards_files/shapeimage_3.jpg" alt="" style="height: 1px; left: -24px; position: absolute; top: 1078px; width: 832px; z-index: 1; " />

<img src="Coding%20Standards_files/shapeimage_4.png" alt="Copyright (C) Team Retribution 2007" title="" id="id4" style="height: 16px; left: 540px; position: absolute; top: 1086px; width: 245px; z-index: 1; " />

<img src="Coding%20Standards_files/shapeimage_5.png" title="" id="id5" style="height: 936px; left: 26px; position: absolute; top: 128px; width: 750px; z-index: 1; " />


          <div class="graphic_textbox_style_default" style="height: 935px; left: 26px; position: absolute; top: 142px; width: 739px; z-index: 1; " id="id6">
            <div>
              <div class="graphic_textbox_layout_style_default">
                <div class="paragraph Free_Form" style="line-height: 29px; margin-bottom: 0px; margin-top: 0px; padding-top: 0pt; text-align: center; font-family: 'Helvetica-Bold', 'Helvetica', 'Arial', 'sans-serif'; font-size: 24px; font-weight: bold; line-height: 29px;">Code Standards</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;  text-decoration: none;"> </div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">To ensure that we all understand each other’s code and so we all know what naming conventions etc. to use, this is a short description</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">of the coding standards required for this project. By following these coding   standards   it   will   ensure   that   when   we   are   working</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">simultaneously on a file that SVN is able to merge the parts that we each updated of the file together into the modified file without any</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">difficulty.    </div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;  text-decoration: none;"> </div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">&gt;      Indentation shall be one tab (indent each subcomponent or statement one tab more than the structure within which it is nested).</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">&gt;      There shall be a single space on both sides of a binary operator.</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">&gt;      Each segment of code shall be separated by a single line.</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">&gt;      We shall be using a slightly modified version of the nextline standard for blocks. When opening blocks, place the brace on a new</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">line. Place  the  closing brace directly below the opening brace. (If opening block is in column zero then closing brace must be in column zero).</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">Brief Notes About Variables/Arrays/Objects: </div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">&gt;&gt;  Never use one character variable name e.g. double i; unless it is as a loop control variable.</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">&gt;&gt;  The variable i shall be the variable name used for as the loop control variable continuing with j,k,l etc. for nested loops.</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">&gt;&gt;  Once a variable is declared, it shall be immediately initialised with the value null. Brief Notes About Naming Conventions (Standard Java Conventions To Be Used): </div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">&gt;&gt;  Start class names with a capital letter.</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">&gt;&gt;  Variables should start with a letter and be as descriptive as possible. Avoid using underscores (these are reserved for constants</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">and temp variables.)</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;  text-decoration: none;"> </div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">EXAMPLE:</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">import javax.swing.JOptionPane;</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">public class RetributionCodeStandardSample</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">{</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">    public static void main(String [] args)</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">    {</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">        //Variables of String Type to be declared and initialised to null </div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">        String userName = null;</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">        //Other variables to be declared</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">       int radius = 0;</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">       double area = 0;</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">        // Ask user for their name</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">        userName = JOptionPane.showInputDialog(null,"What's your name?");</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">       </div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">        //Use for loop to count from 10 to 20.</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">        for (int i=10; i&lt;21; i++)</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">        {</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">        //Constant of pie declared and set</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">         final double PI = 3.14;</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">         //Calculate area of cicrcle and display results.</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">         radius = i;</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">         area = radius * radius * PI;</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">        JOptionPane.showMessageDialog(null, "Hello, " + userName + " " + ". The Area Of The</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">Circle Is " + area);</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">        }</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">         System.exit(0);</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">    }</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">}</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">COMMENTS </div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">Javadoc comments should be used at all times. Comments should be used as much as possible (remember commenting now will save time later and help everyone to understand each others code) and must be placed at the beginning of every class and method. Every class should contain at the very least the authors name, data created &amp; time created and date &amp; time last revised.</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">Variables, arrays, objects etc. should be commented where ever possible.</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">Comments less than (&lt;) one line should be of the format</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">//This double variable holds the value for the area.</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">double radius = 12;</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">Comments greater than (&gt;) one line should be of the format</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">/**Lots of stuff </div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">* to be put here */</div>
                <div class="paragraph Free_Form" style="line-height: 17px; margin-bottom: 0px; margin-top: 0px; font-family: 'Helvetica', 'Arial', 'sans-serif'; font-size: 12px; line-height: 14px;">   </div>
                <div class="paragraph Body" style="line-height: 20px; padding-bottom: 0pt; text-decoration: none;"> </div>
              </div>
            </div>
          </div>
          <div style="height: 1111px; line-height: 1111px; " class="tinyText"> </div>
        </div>
        <div style="height: 150px; margin-left: 0px; position: relative; width: 800px; z-index: 15; " id="footer_layer">
          <div style="height: 0px; line-height: 0px; " class="tinyText"> </div>
        </div>
      </div>
    </div>
  </body>
</html>


